package com.CST.service.ys;

import com.CST.dto.ys.YearDTO;
import com.CST.dto.ys.YsBusinessTargetDTO;
import com.CST.entity.ys.YsBusinessTarget;
import com.CST.vo.ys.YsBusinessTargetRecordVO;
import com.CST.vo.ys.YsBusinessTargetVO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

/**
 * 业务量配套指标
 *
 * @author cw
 * @since 2023-05-06
 */
public interface YsBusinessTargetService extends IService<YsBusinessTarget> {

    /**
     * 新增
     * @param ysBusinessTarget info
     * @return 结果
     */
    Integer insertYsBusinessTarget(YsBusinessTarget ysBusinessTarget);

    /**
     * 修改
     * @param ysBusinessTarget ysBusinessTarget
     * @return result
     */
    Integer updateYsBusinessTarget(YsBusinessTarget ysBusinessTarget);

    /**
     * 删除
     * @param id id
     * @return result
     */
    Integer deleteYsBusinessTarget(Long id);

    /**
     * 回显
     * @param id id
     * @return result
     */
    YsBusinessTargetVO selectInfoById(Long id);

    /**
     * 获取业务量配套指标列表
     * @param ysBusinessTargetDTO 查询条件
     * @return result
     */
    PageInfo<YsBusinessTargetVO> getYsBusinessTargetList(YsBusinessTargetDTO ysBusinessTargetDTO);

    /**
     * 发布
     * @param ysBusinessBudgetDto 默认不传参数，数据全部发布
     * @return result
     */
    Boolean releaseData(YsBusinessTargetDTO ysBusinessBudgetDto);

    /**
     * 撤销
     * @param id id
     * @return result
     */
    Boolean revokeRecord(Long id);

    /**
     * 查询修订记录列表
     * @param ysBusinessTargetDTO 查询条件
     * @return result
     */
    PageInfo<YsBusinessTargetRecordVO> selectRecordList(YsBusinessTargetDTO ysBusinessTargetDTO);

    /**
     * 继承
     * @param dto 参数
     * @return result
     */
    Boolean extendsData(YearDTO dto);

    /**
     * 下载模版
     * @param response
     */
    void download(HttpServletResponse response);

    /**
     * 导出
     * @param response response
     * @param dto 查询参数
     */
    void exportExcelYsBusinessTarget(HttpServletResponse response, YsBusinessTargetDTO dto);

    /**
     * 导入
     * @param file file
     */
    void importExcelYsBusinessTarget(MultipartFile file);
}
